import React from 'react';
import { WeaFormItem, WeaInput, WeaInputNumber, WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

// 显示条数
class EShowNum extends React.Component {
    state = {
        value: this.props.value,
    };

    render() {
        return (
            <WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@3qgo7a`} label={getLabel(19493, '显示条数')} labelCol={{ span: 6 }} wrapperCol={{ span: 16 }}>
                <WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@kguez1`} min={0} value={this.state.value} style={{ width: '100px' }} onChange={value => this.setState({ value })} />
            </WeaFormItem>
        );
    }

    getSaveValues() {
        return this.state.value;
    }
}

export default EShowNum;
